inherited dm_plano_pagamento: Tdm_plano_pagamento
  OldCreateOrder = True
  Left = 456
  Top = 273
  inherited sqlConsulta: TSQLQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'empresa'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '  a.cod_plano,'
      '  a.lig_cod_empresa,'
      '  a.lig_cod_tipo_documento,'
      '  a.descricao,'
      '  a.entrada,'
      '  a.tipo_lancamento,'
      '  a.situacao,'
      '  a.num_parcelas,'
      '  a.dias_entre_parcelas,'
      '  a.desconto,'
      '  a.juros,'
      '  a.multa,'
      '  a.valor_minimo,'
      '  a.data_cad,'
      '  a.data_alteracao,'
      '  case'
      '    when a.situacao = '#39'True'#39' then '#39'ATIVO'#39' else '#39'INATIVO'#39
      '  end as situacao_desc,'
      '  b.descricao as tipo_docto,'
      '  c.descricao_multiempresa'
      'from PLANO_PAGAMENTO a'
      
        'left join tipo_documento b on (b.cod_documento = a.lig_cod_tipo_' +
        'documento)'
      'left join empresa c on (c.cod_empresa = a.lig_cod_empresa)'
      'where a.lig_cod_empresa = :empresa')
  end
  inherited cdsConsulta: TClientDataSet
    object cdsConsultaCOD_PLANO: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_PLANO'
      Required = True
    end
    object cdsConsultaLIG_COD_EMPRESA: TIntegerField
      Alignment = taCenter
      FieldName = 'LIG_COD_EMPRESA'
      Required = True
    end
    object cdsConsultaLIG_COD_TIPO_DOCUMENTO: TIntegerField
      Alignment = taCenter
      FieldName = 'LIG_COD_TIPO_DOCUMENTO'
      Required = True
    end
    object cdsConsultaDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 50
    end
    object cdsConsultaENTRADA: TStringField
      Alignment = taCenter
      FieldName = 'ENTRADA'
      Size = 5
    end
    object cdsConsultaTIPO_LANCAMENTO: TStringField
      Alignment = taCenter
      FieldName = 'TIPO_LANCAMENTO'
      Size = 5
    end
    object cdsConsultaSITUACAO: TStringField
      Alignment = taCenter
      FieldName = 'SITUACAO'
      Size = 5
    end
    object cdsConsultaNUM_PARCELAS: TIntegerField
      Alignment = taCenter
      FieldName = 'NUM_PARCELAS'
    end
    object cdsConsultaDIAS_ENTRE_PARCELAS: TIntegerField
      Alignment = taCenter
      FieldName = 'DIAS_ENTRE_PARCELAS'
    end
    object cdsConsultaDESCONTO: TFMTBCDField
      FieldName = 'DESCONTO'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsConsultaJUROS: TFMTBCDField
      FieldName = 'JUROS'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsConsultaMULTA: TFMTBCDField
      FieldName = 'MULTA'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsConsultaVALOR_MINIMO: TFMTBCDField
      FieldName = 'VALOR_MINIMO'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsConsultaDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object cdsConsultaDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsConsultaSITUACAO_DESC: TStringField
      Alignment = taCenter
      FieldName = 'SITUACAO_DESC'
      Required = True
      FixedChar = True
      Size = 7
    end
    object cdsConsultaTIPO_DOCTO: TStringField
      FieldName = 'TIPO_DOCTO'
      Size = 50
    end
    object cdsConsultaDESCRICAO_MULTIEMPRESA: TStringField
      FieldName = 'DESCRICAO_MULTIEMPRESA'
      Size = 50
    end
  end
  inherited qryPKChave: TSQLQuery
    SQL.Strings = (
      'SELECT GEN_ID(gen_plano_pagamento,1)'
      'FROM RDB$DATABASE')
  end
  inherited cdsRegistro: TClientDataSet
    object cdsRegistroCOD_PLANO: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_PLANO'
      Required = True
    end
    object cdsRegistroLIG_COD_EMPRESA: TIntegerField
      Alignment = taCenter
      FieldName = 'LIG_COD_EMPRESA'
      Required = True
    end
    object cdsRegistroLIG_COD_TIPO_DOCUMENTO: TIntegerField
      Alignment = taCenter
      FieldName = 'LIG_COD_TIPO_DOCUMENTO'
      Required = True
    end
    object cdsRegistroDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 50
    end
    object cdsRegistroENTRADA: TStringField
      Alignment = taCenter
      FieldName = 'ENTRADA'
      Size = 5
    end
    object cdsRegistroTIPO_LANCAMENTO: TStringField
      Alignment = taCenter
      FieldName = 'TIPO_LANCAMENTO'
      Size = 5
    end
    object cdsRegistroSITUACAO: TStringField
      Alignment = taCenter
      FieldName = 'SITUACAO'
      Size = 5
    end
    object cdsRegistroNUM_PARCELAS: TIntegerField
      Alignment = taCenter
      FieldName = 'NUM_PARCELAS'
    end
    object cdsRegistroDIAS_ENTRE_PARCELAS: TIntegerField
      Alignment = taCenter
      FieldName = 'DIAS_ENTRE_PARCELAS'
    end
    object cdsRegistroDESCONTO: TFMTBCDField
      Alignment = taCenter
      FieldName = 'DESCONTO'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsRegistroJUROS: TFMTBCDField
      Alignment = taCenter
      FieldName = 'JUROS'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsRegistroMULTA: TFMTBCDField
      Alignment = taCenter
      FieldName = 'MULTA'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsRegistroVALOR_MINIMO: TFMTBCDField
      Alignment = taCenter
      FieldName = 'VALOR_MINIMO'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsRegistroDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object cdsRegistroDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
  end
  inherited sqlRegistro: TSQLQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'codigo'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '  a.cod_plano,'
      '  a.lig_cod_empresa,'
      '  a.lig_cod_tipo_documento,'
      '  a.descricao,'
      '  a.entrada,'
      '  a.tipo_lancamento,'
      '  a.situacao,'
      '  a.num_parcelas,'
      '  a.dias_entre_parcelas,'
      '  a.desconto,'
      '  a.juros,'
      '  a.multa,'
      '  a.valor_minimo,'
      '  a.data_cad,'
      '  a.data_alteracao'
      'from PLANO_PAGAMENTO a'
      'where a.cod_plano = :codigo')
  end
end
